package stu.text;

import java.math.BigDecimal;

public class text {

	public static void main(String[] args) {
		final BigDecimal TEN_CENTS=new BigDecimal(".10");
		int itemBought=0;
		BigDecimal funds=new BigDecimal("1.00");
		for(BigDecimal price=TEN_CENTS;
				funds.compareTo(price)>=0;
				price=price.add(TEN_CENTS)) {
				itemBought++;
				funds=funds.subtract(price);
		}
		System.out.println(itemBought+" items bought.");
		System.out.println("Money left over:"+funds);

	}

}
